RetroMission
***
CD-ROM
|
disk
|
FTP
|
web
|
AOL
|
usenet
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
util
/
shell
/
conbuffer11.lha
/
.TOOLS
/
CB.doc
(
.txt
)
Wrap
Text File
|
1991-10-12
|
11KB
|
250 lines
Console Buffer provides a history and/or hardcopy (either file or
device) of console I/O. CB can be used with either CLI or shell
windows. Console I/O is saved in a buffer, the size of which is set
by the user. When CB is activated a scroll gadget is attached to the
right hand side of the console window. Clicking on this gadget displays
past console messages.
This is version 1.1, the latest version as of May 20, 1990.
Console Buffer by
William J. Fritz
4504 E. Yates Rd.
Bensalem, Pa. 19020
215-245-1584
GEnie electronic mail address W.FRITZ1
PROGRAM UPDATES:
Version 1.1
4/07/90 Due to a problem finding the font size if the font was changed
after the console was opened I now use the font in the window
rastport rather than the window font itself to find the ysize.
5/11/90 Console hang problem using CB with the Matt Dillon Shell reported
to me by Alan P. McDonley. I added code to filter Device Status
Reports out of the buffer when it is displayed. These reports
are sent to the console by the shell for every console prompt.
5/11/90 Increased the maximum number of lines on a display from 50 to
99 for those of you running an interlaced PAL screen with an
eight or nine point font.
5/12/90 Exiting from buffer display mode is now accomplished by hitting
any unused key rather than the <q> key. Thanks to John Baker of
Falls Church, Va. for the idea.
CONDITIONS FOR USE AND DISTRIBUTION:
CB is Copyright (c) 1990 by William J. Fritz
CB is a copyrighted program that is provided "as is". There is no
warranty, either expressed or implied, as to the quality or usefullness
of the program. The user of the program accepts all risks associated with
it's use.
CB is freely distributable provided:
1. The files are all left intact.
2. No charge is made for CB (other than a reasonable copy charge of $6.00
or less)
3. CB is not packaged as a part of a commercial product.
4. CB may not be uploaded to any electronic service that claims
a copyright to it's files and programs.
DESCRIPTION:
Console Buffer is for CLI users who would like to have a history
and/or hardcopy (either file or device) of their console input and output.
It works with both CLI and shell windows. Console I/O is saved in a
buffer, the size of which is set by the user. The default buffer size is
100 lines.
When the program is started a proportional gadget is attached to the
console window that can be used to scroll through the console I/O just as
you would use a word processor vertical scroll gadget.
The Console Buffer program consists of two modules.
CB - CB loads CB-handler if it is not loaded and
interprets the command line arguments. If CB-handler
is present the current status is reported.
CB-handler - CB-handler monitors the console that CB was started
from, builds the buffer in memory and displays the
buffer data. This module must be placed in either the
current directory or the L: directory of the system
disk in order for CB to find it.
CLI Argument Help:
For command line argument help type <CB ?>.
START:
To start CB type <CB> at the console you wish to monitor--this will
use the default of 100 lines. Do not "run" the program. (e.g. "run CB"). If
you wish another number of lines saved open with <CB -l###>, ### being the
number of lines to save. For a hard-copy of the Console I/O start with
<CB -hname>, the name being either a file name or device name. (e.g.<CB -hPRT:>
to have the printer as the hardcopy device)
The -o, -q and -r options to output buffer, quit and reset cannot be used
at Console Buffer startup as they pertain to a currently active buffer only.
DISPLAY:
To display the buffer click on the proportional gadget in the right
border of the console window. The title line of the console window will
be changed to indicate display mode is active.
While in display mode use either the prop gadget or the up and down
arrow keys to view the buffer.
up-arrow scroll down one line
down-arrow scroll up one line
shift-up-arrow scroll down one window frame
shift-down-arrow scroll up one window frame
control-up-arrow scroll to top of buffer
control-down-arrow scroll to bottom of buffer
Single line scrolling is also possible by clicking and holding the mouse
within the display window. The area that the mouse pointer occupies determines
the speed and direction of scrolling. The window is divided into five horizontal
zones of equal size. The center zone does no scrolling. The next zone out from
the center gives a slow scroll. If the pointer above the center zone you will
scroll down, if below you will scroll up. The top and bottom zones are for
fast scrolling.
Scrolling up or down by a window frame will be inaccurate if any lines
within the displayed window frame contain more characters than can fit on
a single window line. When the cursor reaches the right edge of the window
an automatic line feed is performed and the buffer line continues on the
following window line. The problem is that this is still considered the
same line to the program. Each time an automatic line feed is done the window
frame scroll will go one line too far and the top line in the window frame
will be scrolled off the display. If your buffer contains lines longer than
the console window use the single line scroll instead of the window frame
scroll.
If another program sends something to the console window while in display
mode it will be suspended until you return from display mode.
To quit display mode and return to the normal console window enter any
key other than the up and down arrow keys. The window's original title will
re-appear.
COMMAND LINE OPTIONS:
The command lines listed below facilitate:
1. Setting the maximum number of lines to keep in memory.
2. Specifying a hardcopy device or file for a permanent record of
console IO.
3. Setting the update frequency for the hardcopy device or file.
4. Including time stamps on console prompts in the buffer data.
5. Reseting the buffer - releasing the current data from memory.
6. Sending the currently buffered data to a device or file.
7. Exiting the Console Buffer program.
The first time CB is called a buffer is started and whatever command
line options are specified are activated. After the buffer is started you
may alter any of these options by calling CB again with whatever changes
you desire on the command line. Only the options on the command line will
be changed.
For example: if you are using a hardcopy and wish to delete it enter
<CB -h>, the lack of a name after the <h> switch will cause no hardcopy to
be used. Any remaining lines in the buffer that have not been copied to the
hardcopy will be flushed.
SET MAX LINES: <CB -l200>
The -l option sets the maximum number of lines to keep in memory. If the
number of lines is set after the program has been running and is lower than
that being currently buffered by the program, excess lines in the buffer
will be discarded.
The above example would set the maximum number of lines that the buffer
will hold at 200. At the 201st line the first line that went into the buffer
would be discarded and the 201st line entered at the end.
If you are using the hardcopy option the maximum number of lines that the
buffer will hold must be set higher than the hardcopy update value. If you
try to set it lower an error message will appear and the -l option will not
be done.
HARDCOPY: <CB -hPRT: -u25>
The -h option (hardcopy) allows you to make a permanent record of the
console I/O. The buffer data can be directed to any AmigaDOS device or file.
The format of the command line is <CB -hname> where name if the name of
the file or device that you wish to receive the hardcopy data. Note that
there must be no intervening spaces between the <h> and the <name>.
The above example would send the hardcopy data to the printer, writing
to the printer only after 25 lines have been accumulated, then sending
all 25 lines.
Care should be used with this option as using the printer for hardcopy
will significantly slow down the console I/O, specifying a floppy disk file
will require that disk be installed all the time the buffer is running.
Having a hardcopy does not preclude the use of the buffer.
The -u option (update) specifies the frequency of hardcopy access. For
safety the hardcopy is opened and closed each time data is sent to it.
Doing this can perceptibly slow down the console. Using the update command
line option you can set the update value for writing to the hardcopy device
or file. This value specifies the number of lines to accumulate in the
buffer before sending them to the hardcopy. The update value, which
defaults to 10 lines, must be less than the maximum number of lines to
buffer.
TIME STAMP:
The -t option will mark all prompt lines in the buffer with the time that
the command is entered. The time is in military format. This time stamp will
only be in the buffer, not on the CLI display.
RESET BUFFER:
The -r option (reset buffer) releases all the lines currently being held
in memory. Using the -r option does not change the maximum number of lines
that the buffer can hold. This option is only valid on a running Console
Buffer, it can not be specified at start-up.
OUTPUT BUFFER:
The -o option (output buffer) dumps all of the lines currently being held
in memory to the specified file or device. The format is <CB -oname> where
name if the file or device you wish to receive the data. Note that there
must be no intervening spaces between the <o> and the <name>.
This option only pertains to a running Console Buffer and cannot be
specified on program start-up.
QUIT:
To quit and recover memory used by the buffer, type <CB -q>. If this
hangs do to an error in the conbuf-handler module you can exit with a
Control-C. Ending the CLI that the buffer is attached to will automatically
end that Console Buffer, recovering all memory used.
MEMORY REQUIREMENTS:
After the program is started the storage used is approximately 9 K, plus
the lines buffered. Each line buffered uses the size of the line plus eight
bytes. Running the program with a 100 line buffer will use about 14K of
storage. Using a 500 line buffer will require about 28K.
COMMENTS:
Any comments, constructive criticism or useful additions to the program
may be directed to me at the above address or on GEnie electronic mail at
address W.FRITZ1